#pragma once

#include "event.h"

#include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>


namespace Lab1
{
    class EventQueue
    {
    public:
        void push( const std::shared_ptr < const Event > & event );

        std::shared_ptr < const Event > pop( const std::chrono::milliseconds & duration );

    private:
        std::queue < std::shared_ptr < const Event > > queue;
        std::mutex mutex;
        std::condition_variable condition;
    };
}

